package com.java.simple.smallspring.test.event;

import com.java.simple.smallspring.context.ApplicationListener;
import lombok.extern.slf4j.Slf4j;

import java.util.Date;

/**
 * @author zhoujunlin
 * @date 2022年09月01日 21:39
 * @desc
 */
@Slf4j(topic = "c.CustomEventListener")
public class CustomEventListener implements ApplicationListener<CustomEvent> {

    @Override
    public void onApplicationEvent(CustomEvent event) {
        log.info("用户自定义事件收到：{}消息；时间：{}", event.getSource(), new Date());
        log.info("消息id:{},message:{}", event.getId(), event.getMessage());

    }
}
